import { xpinRequest } from '@/request';

// AI仿写列表
export const getContentAiLog = (payload) => {
  return xpinRequest({
    url: '/xpin/api/tools/v1/ai_writing/log_list',
    payload,
  });
};
// AI仿写详情接口
export const getContentAiDetail = (payload) => {
  return xpinRequest({
    url: '/xpin/api/tools/v1/ai_writing/detail',
    payload,
  });
};
// AI仿写处理
export const aiWriting = (payload) => {
  return xpinRequest({
    method: 'POST',
    codeIgnore: true,
    url: '/xpin/api/tools/v1/ai_writing/writing',
    payload,
  });
};
// AI仿写修改处理
export const updateContentAi = (payload) => {
  return xpinRequest({
    method: 'POST',
    url: '/xpin/api/tools/v1/ai_writing/update',
    payload,
  });
};
// AI仿写重新处理
export const rewriteContentAi = (payload) => {
  return xpinRequest({
    method: 'POST',
    codeIgnore: true,
    url: '/xpin/api/tools/v1/ai_writing/rewrite',
    payload,
  });
};
// AI仿写终止处理
export const cancelContentAi = (payload) => {
  return xpinRequest({
    method: 'POST',
    url: '/xpin/api/tools/v1/ai_writing/cancel',
    payload,
  });
};

// AI仿写剩余次数
export const getAiWritingLeftNum = () => {
  return xpinRequest({
    url: '/xpin/api/tools/v1/ai_writing/left_num',
  });
};
